package com.luoguijia.disk.obs;

import com.obs.services.ObsClient;
import com.obs.services.model.ObjectListing;
import com.obs.services.model.ObsObject;

import java.util.List;

public class ObsMain {
    private static  final  String endpoint="obs.cn-east-3.myhuaweicloud.com";
    private static  final  String  ak = "HPUA0N2NRIUMTIXXXRDL";
    private static  final  String  sk = "wcSWlrHyjDqIlRch5HFWNvhf8AwsuPP57yClWtEm";
    private static  final  String  bucketName = "obs.cn-north-4.group2.com";

//    public static void main(String[] args) {
//        ObsClient obsClient = new ObsClient(ak,sk,endpoint);
//        ObjectListing list = obsClient.listObjects(bucketName);
//        List<ObsObject> listObjects = list.getObjects();
//        for(ObsObject obsObject:listObjects){
//            System.out.println("obsKey:" + obsObject.getObjectKey());
//            System.out.println("obsSize:"  + obsObject.getMetadata().getContentLength());
//        }
//    }
}